<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org/">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no">
    <title>文章管理首页</title>
    <link rel="stylesheet" href="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/css/bootstrap.min.css">
    <link rel="stylesheet" href="../static/css/articlemanage.css" th:href="@{/css/articlemanage.css}">
    <link rel="stylesheet" href="../static//css/public.css" th:href="@{/css/public.css}">
    <script src="http://cdn.static.runoob.com/libs/jquery/2.1.1/jquery.min.js"></script>
    <script src="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/js/bootstrap.min.js"></script>
    <link rel="shortcut icon" href="../static/img/logo.png" th:href="@{/img/logo.png}" type="image/x-icon"/>

    <style>

    </style>
</head>
<body>

<div class="pre-header">
    <a href="index.html">返回首页</a>
</div>
<div class="container-fluid artcontainer">
    <div class="row">
        <div class="col-md-1 col-md-offset-2 artleftnav">
            <div class="tab-pane fade in active" id="section-1">
                <div>
                    <ul id="myTab" class="nav nav-pills nav-stacked">
                        <li class="active">
                            <a href="#allart" data-toggle="tab">全部文章</a>
                        </li>
                        <li>
                            <a href="#publicart" data-toggle="tab">公开文章</a>
                        </li>
                        <li>
                            <a href="#privatesrt" data-toggle="tab">私密文章</a>
                        </li>
                        <li>
                            <a href="#addart" data-toggle="tab">添加文章</a>
                        </li>
                        <li>
                            <a href="#collectuser" data-toggle="tab">关注用户</a>
                        </li>
                        <li>
                            <a href="#collectart" data-toggle="tab">收藏列表</a>
                        </li>
                        <li>
                            <a href="#commentmanage" data-toggle="tab">评论管理</a>
                        </li>
                        <li>
                            <a href="#commentmanage" data-toggle="tab">其他</a>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
        <div class="col-md-7">
            <div class="tab-content">
                <div class="tab-pane fade " id="allart">
                    <div class="panel panel-default">
                        <div class="panel-heading" style="height: 30px"></div>
                        <div class="col-sm-10 panel-headbtn">
                            <input type="button" class="btn btn-danger btn-sm" value="删除" onclick="deleteArts()"/>
                            <input type="button" class="btn btn-info btn-sm" value="编辑" onclick="invert()"/>
                            <input type="button" class="btn btn-success btn-sm" value="发布"/>
                            <input type="button" class="btn btn-warning btn-sm" value="保存"/>

                        </div>
                        <div class="panel-body">
                            <table class="table table-striped panel-table" id="table1">
                                <thead>
                                <tr>
                                    <th><input type="radio" onclick="checkedAll(this)">全选</th>
                                    <th>分类</th>
                                    <th>标题</th>
                                    <th>描述</th>
                                    <th>img</th>
                                    <th>点赞数</th>
                                    <th>浏览数</th>
                                    <th>创建日期</th>
                                    <th>状态</th>
                                    <th>操作</th>
                                </tr>
                                </thead>
                                <tbody>
                                <tr>
                                    <td><input type="checkbox" name="checkbox" id="11" onclick="cancel()">fg</td>
                                    <td>抑郁症</td>
                                    <td>难懂是难言的问题吗</td>
                                    <td>XXXXXXX呀呀呀呀呀呀晕晕</td>
                                    <td><img src="../static/img/login/female.png" alt="加载"/></td>
                                    <td>122</td>
                                    <td>330</td>
                                    <td>2020-10-12</td>
                                    <td>
                                        <span class="label label-info label-xs">发布</span>
                                    </td>
                                    <td>
                                        <input type="button" class="btn btn-info btn-xs" value="查看"/>
                                    </td>
                                </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
                <div class="tab-pane fade" id="publicart">
                    <p>publicart</p>
                </div>
                <div class="tab-pane fade" id="privatesrt">
                    <p>privatesrt</p>
                </div>
                <div class="tab-pane fade" id="addart">
                    <div class="idetortips">
                        <button class="btn btn-success markmd" id="addart-md" onclick="addartByMd()">Markdown编辑器
                        </button>
                        <button class="btn btn-default markmd">普通文本编辑</button>
                    </div>

                </div>
                <div class="tab-pane fade" id="collectuser">
                    <p>collectuser</p>
                </div>
                <div class="tab-pane fade" id="collectart">
                    <p>collectart</p>
                </div>
                <div class="tab-pane fade" id="commentmanage">
                    <p>commentmanage</p>
                </div>
            </div>
        </div>
    </div>
</div>


</body>
<script>
    function addartByMd() {
        window.location.href = "/article/toaddart"
    }

    function checkedAll(ptr) {
        $(":checkbox[type=checkbox]").prop("checked", ptr.checked)
    }

    function getSelectItems() {
        var id_array = [];
        $.each($('input:checkbox:checked'),function(){
            id_array.push($(this).val()); //塞值
        });
        return id_array;
    }

    function deleteArts(){
        var arr = getSelectItems();
        alert(arr)
    }


</script>
</html>
